#pragma once

#include "ogr_core.h"
#include "MapLayer.h"

class CMap2ClientTransform;
class CGISApplication;
class CDeviceContext;
class CDrawer;

class CCanvas
{
public:
    CCanvas(CGISApplication* pGISApplication);
    ~CCanvas(void);
    void setClientSize(CSize size);
    void setMapExtend(CMapLayerEnvelope extend);
	void setMaxMapExtend(CMapLayerEnvelope extend);
	CMapLayerEnvelope getMapExtend();
	void setDeviceContext(CDeviceContext* pDC);
	CMap2ClientTransform* getTransform(){return m_pMap2ClientTrans;}
	void invalidate();
	void draw();
    void draw(CDeviceContext* pDC);
    void setWnd(CWnd* pWnd);
private:
    CSize mClientSize;
    CMapLayerEnvelope m_mapExtend;
	CMapLayerEnvelope m_mapMaxExtend;
	CMap2ClientTransform* m_pMap2ClientTrans;
    CGISApplication* m_pGISApplication;
	CDeviceContext* m_pDC;
	CDrawer* m_pDrawer;
    CWnd* m_pWnd;
};
